<template>
  <div class="not-found-page">
    <div class="error-container">
      <div class="error-image-fallback">404</div>
      <h2>页面不存在</h2>
      <p>抱歉，您访问的页面不存在或已被删除</p>
      <van-button 
        type="primary" 
        size="small" 
        @click="goHome"
      >
        返回首页
      </van-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

// 返回首页
const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.not-found-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.error-image-fallback {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  color: #1989fa;
  background-color: #f7f8fa;
  border-radius: 8px;
}

h2 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 24px;
  color: #323233;
}

p {
  margin-bottom: 24px;
  font-size: 14px;
  color: #969799;
}
</style>
